package com.swallowtech.mstation.core.repository.mybatis;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import com.swallowtech.mstation.core.domain.MusicBookmark;
import com.swallowtech.mstation.core.domain.User;
import com.swallowtech.mstation.core.repository.MusicBookmarkRepository;

@Repository
public class MusicBookmarkRepositoryImpl implements MusicBookmarkRepository {
	@Autowired
	private BookmarkMapper bookmarkMapper;
	
	public MusicBookmark findByPrimaryKey(String id) {
		return bookmarkMapper.selectByPrimaryKey(id);
	}

	public MusicBookmark findByUniqueKey(String userId, String url) {
		// TODO Auto-generated method stub
		return bookmarkMapper.selectByUniqueKey(userId,url);
	}

	public void insert(MusicBookmark musicBookmark) {
		bookmarkMapper.insert(musicBookmark);		
	}

	public void update(MusicBookmark musicBookmark) {
		bookmarkMapper.updateByPrimaryKey(musicBookmark);
		
	}

	public List<MusicBookmark> findByAllOfUser(User user) {
		// TODO Auto-generated method stub
		return null;
	}
//
//	public <T extends Entity> T findByPrimaryKey(T entity) {
//		// TODO Auto-generated method stub
//		return null;
//	}
//
//	public Collection<Entity> findAll() {
//		// TODO Auto-generated method stub
//		return null;
//	}
//
//	public void insert(Entity entity) {
//		// TODO Auto-generated method stub
//		
//	}
//
//	public void update(Entity entity) {
//		// TODO Auto-generated method stub
//		
//	}
//
//	public void delete(Entity entity) {
//		// TODO Auto-generated method stub
//		
//	}
//
//	public void updateByPrimaryKey(String pk) {
//		// TODO Auto-generated method stub
//		
//	}
//
//	public void deleteByPrimaryKey(String pk) {
//		// TODO Auto-generated method stub
//		
//	}
//
//	public Entity findByPrimaryKey(String pk) {
//		// TODO Auto-generated method stub
//		return null;
//	}
	
	




}
